import Vue from 'vue'
import VueRouter from 'vue-router'
import home from './views/home';

Vue.use(VueRouter)

const routes = [
    {
        id: 0,
        path: '/',
        label: '首页',
        component: home
    }, {
        path: '*',
        component: {
            render(h) {
                return h('h1', '404 not found')
            }
        }
    }
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router
